1. Field of the Invention
The present invention relates to a technique of allowing to suppress degradation of the image quality when a captured image contains a shadow of a foreign substance adhering near an image capturing element of, e.g., a digital camera.
2. Description of the Related Art
With the recent rapid progress of digitization of cameras, so-called digital single-lens reflex cameras are especially becoming popular, which have the same optical arrangement as a conventional single-lens reflex camera and use not a film but an image capturing element for photoelectric conversion. A digital single-lens reflex camera requires neither film winding nor film exchange. For this reason, once a foreign substance such as dust enters near the image capturing element during, e.g., lens exchange, captured images continue to contain the foreign substance, resulting in degradation of the quality of a series of captured images.
Japanese Patent Laid-Open No. 2002-204379 discloses a method of removing a foreign substance in an image capturing apparatus. According to the invention disclosed in Japanese Patent Laid-Open No. 2002-204379, a user removes a foreign substance that has entered in an operation such as lens exchange by operating a dustproof element arranged near the image capturing plane instead of cleaning using, e.g., a blower, thereby obtaining a high-quality image.
Japanese Patent Laid-Open No. 2004-222231 discloses a method of correcting a luminance change caused by a foreign substance on the basis of a reference image. According to the invention disclosed in Japanese Patent Laid-Open No. 2004-222231, the apparatus captures an image of a reference object with a uniform luminance and generates a transmittance map from the luminance distribution. Then, gain correction is appropriately done for an image captured by a user to correct a transmittance change caused by a foreign substance, thereby obtaining a high-quality image.
Japanese Patent Laid-Open No. 2004-172820 discloses a method of detecting a foreign substance from a plurality of images. According to the invention disclosed in Japanese Patent Laid-Open No. 2004-172820, a user acquires a plurality of images in advance, detects, e.g., an invariable contrast part in the plurality of images, and detects a foreign substance position on the basis of the invariable part. He/she appropriately removes the foreign substance in, e.g., a cleaning mode and then performs image capturing, thereby obtaining a high-quality image.
However, the invention of Japanese Patent Laid-Open No. 2002-204379 requires adding a dustproof element, resulting in high manufacturing cost.
The invention of Japanese Patent Laid-Open No. 2004-222231 cannot appropriately correct the gain if the reference image is inadequate because of, e.g., the influence of texture so it is impossible to obtain a satisfactory image.
The invention of Japanese Patent Laid-Open No. 2004-172820 requires the user to remove a foreign substance in advance in, e.g., a cleaning mode so he/she cannot cope with a foreign substance that has entered immediately before image capturing.